package pit.com.ordermobilesystem.sharepreference;

import android.content.Context;
import android.content.SharedPreferences;

public class OrderSharePreference {
	final static String DATA="data";
	final static String DOWN_LOAD_SYNC="DOWN_LOAD_SYNC";
	final static String UP_LOAD_SYNC="UP_LOAD_SYNC";
	final static String ADMIN="ADMIN";
	final static String USERS_ADMIN="USERS_ADMIN";
	final static String SERVER="58.26.44.70";
	final static String SERVER_PORT="8099";
	final static String HOST="HOST";
	final static String PORT="PORT";
	public static boolean getDownloadSync(Context mContext){
		SharedPreferences ref = mContext.getSharedPreferences(DATA, 0);
		boolean sync = ref.getBoolean(DOWN_LOAD_SYNC, true);
		return sync;		
	}

	
	public static void setDownloadSync(Context mContext, boolean sync) {
		SharedPreferences ref = mContext.getSharedPreferences(DATA, 0);
		SharedPreferences.Editor editor = ref.edit();
		editor.putBoolean(DOWN_LOAD_SYNC, sync);
		editor.commit();

	}
	
	
	public static boolean getUpSync(Context mContext){
		SharedPreferences ref = mContext.getSharedPreferences(DATA, 0);
		boolean sync = ref.getBoolean(UP_LOAD_SYNC, true);
		return sync;		
	}
	
	public static void setUploadSync(Context mContext, boolean sync) {
		SharedPreferences ref = mContext.getSharedPreferences(
				DATA, 0);
		SharedPreferences.Editor editor = ref.edit();
		editor.putBoolean(UP_LOAD_SYNC, sync);
		editor.commit();
	}	

}
